//未完成
public class Test {
    public static void main(String[] args) {
        //
    }
}

class Solution {


    public int strStr(String haystack, String needle) {
        //多趟滑动窗口解决

        int left = 0;
        int right = 0;
        char[] chars = haystack.toCharArray();
        int[] hash2 = new int[26];//haystack
        int[] hash1 = new int[26];//needle
       for(char ch : needle.toCharArray()){
           hash1[haystack.indexOf(needle)] ++;
       }

        int len = haystack.length();
        int count = 0;

        for(right = 0; right < len; right++) {
            //进窗口
            int in = chars[right] - 'a';
            hash2[in]++;
            if(hash2[in]<=hash1[in]){
                count++;
            }

            //判断
            if(count == needle.length()){
                if(){

                }
            }

        }
    }
}
